home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / SYMBOL / Symbol Generators / Expansions / gen-expansion-parallel < prev    next >
Lisp/Scheme  |  1998-10-23  |  3KB  |  82 lines

  1. gen-expansion-parallel distance template expansions
  2.  
  3. This is a parallel version of the expansion. Each expansion is positioned in distance apart, and transposed to start at a symbol which appears on that position in the template pattern. If there are multiple expansions they are taken one of a time, and restarted when necessary. The results have great variety and look promising for the purpose of generating melodies and tonality zones for experimental music. See more examples on the manual.
  4.  
  5. (def-grammar 'mel1
  6.    a (a b c)
  7.    b (c a g)
  8. )
  9.  
  10. (setq seedform (gen-trans a 5 'mel1))
  11.  
  12. (gen-expansion-parallel 10 seedform
  13.     (list seedform
  14.         (symbol-inversion 'a seedform)))
  15.  
  16. Fractal Tonalities
  17.  
  18. A general way of building tonality zones from symbol patterns is to symbol-mix many symbol patterns, and then use symbols-to-tonality to map the symbols onto a scale.
  19.  
  20. (setq symbols
  21.       (symbol-mix
  22.        (gen-expansion 4 '(a b a) '(a b a))
  23.        (gen-expansion 4 '(a c a) '(a c a))
  24.        (gen-expansion 4 '(a d a) '(a d a))))
  25.  
  26. (setq chords
  27.     (symbols-to-tonality
  28.         symbols symbols
  29.         transpose '((0))
  30.         mapping (activate-tonality (blues1 c 3))
  31.     )
  32. )
  33.  
  34. Geometrical Progressions
  35.  
  36. (setq symbols
  37.       (gen-expansion-parallel 4 
  38.            (symbol-repeat 6 '(a b c b c d c d e d e f e f g))
  39.            (list '(a b c d c b a)
  40.                  (symbol-inversion 'a '(a b c d c b a)))))
  41.  
  42. (setq symbols
  43.       (gen-expansion-parallel 3 
  44.            (symbol-repeat 10 '(a b c b c d c d e d e f e f g))
  45.            (list '(a b c d c b a)
  46.                  (symbol-inversion 'a '(a b c d c b a)))))
  47.  
  48. (gen-expansion-parallel 3 
  49.      (flatten (cons-n '(a b c b c d c d e d e f e f g) 10))
  50.      (list '(a b c d c b a)
  51.             (symbol-inversion 'a '(a b c d c b a))))
  52.  
  53. Random Progressions
  54.  
  55. (gen-expansion-parallel 4 
  56.       (flatten (cons-n '(a b c b c d c d e d e f e f g) 10))
  57.       (list (setq mat (gen-random nil 7 '(a b c d e)))
  58.             (symbol-inversion 'a mat)))
  59.  
  60. (gen-expansion-parallel 4 
  61.      (flatten (cons-n (gen-random nil 20 '(a b c d e)) 10))
  62.      (list (setq mat (gen-random nil 7 '(a b c d e)))
  63.            (symbol-inversion 'a mat)))
  64.  
  65. Wave-like Patterns
  66.  
  67. (gen-expansion-parallel 4 
  68.      (flatten (cons-n (gen-random nil 20 '(a b c d e)) 10))
  69.      (list (setq mat (gen-random nil 7 '(a b c d e)))
  70.            (symbol-inversion 'a mat)
  71.            (reverse (symbol-inversion 'a mat))
  72.            (reverse mat)))
  73.  
  74. (setq seedform (gen-trans b 8 'mel1))
  75.  
  76. (gen-expansion-parallel 8 seedform 
  77.       (list seedform
  78.             (symbol-inversion 'a seedform)))
  79.  
  80.  
  81.  
  82.